<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>kitchen_timer - ClueLib</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="kitchen_timer"></a>kitchen_timer</h1><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">class kitchen_timer</td></tr></table></blockquote><p>Counts a simulation time (not a wall clock time) and triggers an event once the timer expires.&nbsp; This class is <u>not</u> thread-safe.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#kitchen_timer" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">kitchen_timer</a></td><td class=SDescription>Counts a simulation time (not a wall clock time) and triggers an event once the timer expires. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#kitchen_timer.Events" >Events</a></td><td class=SDescription></td></tr><tr class="SEvent SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.ring" >ring</a></td><td class=SDescription>Triggers when the specified delay elapsed.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#kitchen_timer.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.new" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">new</a></td><td class=SDescription>Creates a new timer.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#kitchen_timer.set_delay" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">set_delay</a></td><td class=SDescription>Sets the delay for the timer to ring. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.add_delay" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">add_delay</a></td><td class=SDescription>Adds the specified delay. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#kitchen_timer.set_random_delay" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">set_random_delay</a></td><td class=SDescription>Set the random delay for the timer to ring between the specified range. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.start" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">start</a></td><td class=SDescription>Starts the timer. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#kitchen_timer.stop" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">stop</a></td><td class=SDescription>Stops the timer. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.pause" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">pause</a></td><td class=SDescription>Pauses the timer. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#kitchen_timer.resume" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">resume</a></td><td class=SDescription>Resumes the timer, if the timer was paused. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.reset" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">reset</a></td><td class=SDescription>Resets the timer.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#kitchen_timer.get_elapsed" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">get_elapsed</a></td><td class=SDescription>Returns the elapsed time since the timer was last started or resumed. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.get_remaining" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">get_remaining</a></td><td class=SDescription>Returns the remaining time to ring. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#kitchen_timer.is_stopped" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">is_stopped</a></td><td class=SDescription>Returns 1 if the timer is currently stopped.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.is_running" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">is_running</a></td><td class=SDescription>Returns 1 if the timer is currently running.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#kitchen_timer.is_paused" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">is_paused</a></td><td class=SDescription>Returns 1 if the timer is currently paused.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#kitchen_timer.get_state" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">get_state</a></td><td class=SDescription>Returns the current state of the timer.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.Events"></a>Events</h3></div></div>

<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.ring"></a>ring</h3><div class=CBody><p>Triggers when the specified delay elapsed.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.new"></a>new</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function new(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> 0</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a new timer.</p><h4 class=CHeading>Argumment</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>delay</td><td class=CDLDescription><span class="optional">optional</span> The delay for the timer to ring.&nbsp; The default is 0.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.set_delay"></a>set_delay</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function void set_delay(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the delay for the timer to ring.&nbsp; This function resets the timer.</p><h4 class=CHeading>Argumment</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>delay</td><td class=CDLDescription>The delay for the timer to ring.</td></tr></table><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
@kt.ring;
assert( kt.get_elapsed() == 100 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.add_delay"></a>add_delay</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function void add_delay(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the specified delay.&nbsp; If the timer is currently running, the timer is paused, added the delay, then resumed.</p><h4 class=CHeading>Argument</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>delay</td><td class=CDLDescription>The additional delay for the timer to ring.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.set_random_delay"></a>set_random_delay</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function time set_random_delay(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay1,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay2</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Set the random delay for the timer to ring between the specified range.&nbsp; This function resets the timer.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>delay1</td><td class=CDLDescription>The delay boundary 1.</td></tr><tr><td class=CDLEntry>delay2</td><td class=CDLDescription>The delay boundary 2.&nbsp; The delay is randomized between <b>delay1</b> and <b>delay2</b>, inclusive.</td></tr></table><h4 class=CHeading>Returns</h4><p>The randomized delay value.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
time random_delay = kt.set_random_delay( 100, 200 );
kt.start();
@kt.ring;
assert( kt.get_elapsed() == random_delay );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.start"></a>start</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void start()</td></tr></table></blockquote><p>Starts the timer.&nbsp; The <a href="#kitchen_timer.ring" class=LEvent id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">ring</a> event is triggered when the remaining time becomes 0.&nbsp;  The timer can be stopped by calling <a href="#kitchen_timer.stop" class=LFunction id=link18 onMouseOver="ShowTip(event, 'tt7', 'link18')" onMouseOut="HideTip('tt7')">stop</a> or be paused by calling <a href="#kitchen_timer.pause" class=LFunction id=link19 onMouseOver="ShowTip(event, 'tt8', 'link19')" onMouseOut="HideTip('tt8')">pause</a>.&nbsp; If the timer is already started, no action is taken.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
@kt.ring;
assert( kt.get_elapsed() == 100 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.stop"></a>stop</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void stop()</td></tr></table></blockquote><p>Stops the timer.&nbsp; The elapsed time is stamped if the timer was running.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#50 kt.stop();
assert( kt.get_elapsed() == 50 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.pause"></a>pause</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void pause()</td></tr></table></blockquote><p>Pauses the timer.&nbsp; The elapsed time is stamped if the timer was running.&nbsp; The timer can be resumed by calling <a href="#kitchen_timer.resume" class=LFunction id=link20 onMouseOver="ShowTip(event, 'tt9', 'link20')" onMouseOut="HideTip('tt9')">resume</a>.&nbsp; If the timer was not running, no action is taken.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#50 kt.pause();
assert( kt.get_elapsed() == 50 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.resume"></a>resume</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void resume()</td></tr></table></blockquote><p>Resumes the timer, if the timer was paused.&nbsp; Otherwise, no action is taken.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#30 kt.pause();
assert( kt.get_elapsed() == 30 );
kt.resume();
@kt.ring;
assert( kt.get_elapsed() == 70 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.reset"></a>reset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void reset()</td></tr></table></blockquote><p>Resets the timer.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.get_elapsed"></a>get_elapsed</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function time get_elapsed()</td></tr></table></blockquote><p>Returns the elapsed time since the timer was last started or resumed.&nbsp; If the timer is paused or stopped, returns the elapsed time to the last paused or stopped time.</p><h4 class=CHeading>Returns</h4><p>The elapsed time.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
@kt.ring;
assert( kt.get_elapsed() == 100 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.get_remaining"></a>get_remaining</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function time get_remaining()</td></tr></table></blockquote><p>Returns the remaining time to ring.&nbsp;  If the timer is paused or stopped, returns the remaining time from the last paused or stopped time.</p><h4 class=CHeading>Returns</h4><p>The remaining time.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#30;
assert( kt.get_remaining() == 70 );
@kt.ring;
assert( kt.get_remaining() == 0 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.is_stopped"></a>is_stopped</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function bit is_stopped()</td></tr></table></blockquote><p>Returns 1 if the timer is currently stopped.</p><h4 class=CHeading>Returns</h4><p>If the timer is currently stopped, returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#30;
assert( kt.is_stopped() == 0 );
@kt.ring;
assert( kt.is_stopped() == 1 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.is_running"></a>is_running</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function bit is_running()</td></tr></table></blockquote><p>Returns 1 if the timer is currently running.</p><h4 class=CHeading>Returns</h4><p>If the timer is currently running, returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#30;
assert( kt.is_running() == 1 );
@kt.ring;
assert( kt.is_running() == 0 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.is_paused"></a>is_paused</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function bit is_paused()</td></tr></table></blockquote><p>Returns 1 if the timer is currently paused.</p><h4 class=CHeading>Returns</h4><p>If the timer is currently paused, returns 1.&nbsp; Otherwise, returns 0.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#50 kt.pause();
assert( kt.is_paused() == 1 );
kt.resume();
#10;
assert( kt.is_paused() == 0 );</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="kitchen_timer.get_state"></a>get_state</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function state_e get_state()</td></tr></table></blockquote><p>Returns the current state of the timer.</p><h4 class=CHeading>Returns</h4><p>The current state of the timer.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">kitchen_timer kt = new();
kt.set_delay( 100 );
kt.start();
#50 kt.pause();
assert( kt.get_state() == kitchen_timer::PAUSED );
kt.resume();
#10;
assert( kt.get_state() == kitchen_timer::RUNNING );</pre></blockquote></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">class kitchen_timer</td></tr></table></blockquote>Counts a simulation time (not a wall clock time) and triggers an event once the timer expires. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function new(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> 0</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a new timer.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function void set_delay(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the delay for the timer to ring. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function void add_delay(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Adds the specified delay. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>function time set_random_delay(</td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay1,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>time&nbsp;</td><td class="PParameter  prettyprint " nowrap>delay2</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the random delay for the timer to ring between the specified range. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void start()</td></tr></table></blockquote>Starts the timer. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void stop()</td></tr></table></blockquote>Stops the timer. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void pause()</td></tr></table></blockquote>Pauses the timer. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void resume()</td></tr></table></blockquote>Resumes the timer, if the timer was paused. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function void reset()</td></tr></table></blockquote>Resets the timer.</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function time get_elapsed()</td></tr></table></blockquote>Returns the elapsed time since the timer was last started or resumed. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function time get_remaining()</td></tr></table></blockquote>Returns the remaining time to ring. </div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function bit is_stopped()</td></tr></table></blockquote>Returns 1 if the timer is currently stopped.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function bit is_running()</td></tr></table></blockquote>Returns 1 if the timer is currently running.</div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function bit is_paused()</td></tr></table></blockquote>Returns 1 if the timer is currently paused.</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">function state_e get_state()</td></tr></table></blockquote>Returns the current state of the timer.</div></div><div class=CToolTip id="tt17"><div class=CEvent>Triggers when the specified delay elapsed.</div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>